#ifndef PAUSE_H
#define PAUSE_H

namespace util {
  inline void pause(time_t secs = 1, long nsecs = 0L) {
    timespec rem;
    rem.tv_sec = secs;
    rem.tv_nsec = nsecs;
    timespec req;
    do {
      req.tv_sec = rem.tv_sec;
      req.tv_nsec = rem.tv_nsec;
    } while(nanosleep(&req, &rem));
  }
}

#endif
